package com.study.edoc.service.impl;

import com.study.edoc.dao.CategoryDao;
import com.study.edoc.pojo.Category;
import com.study.edoc.service.CategoryService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;


@Service
@Transactional(rollbackFor = Exception.class)
public class CategoryServiceImpl implements CategoryService {


    @Resource
    private CategoryDao categoryDao;

    @Override
    public List<Category> findCategoryList() {
        return categoryDao.selectCategoryList();
    }

    @Override
    public Category findCategoryById(int cid) {
        return categoryDao.selectCategoryById(cid);
    }
}
